package com.swt.service.T_service.impl;

import com.swt.dao.Tdao.ClassroomDao;
import com.swt.domain.Classroom;
import com.swt.service.T_service.ClassroomService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service(value = "TClassroomService")
@Transactional
public class ClassroomServiceImpl implements ClassroomService {
    @Resource(name = "TClassroomDao")
    private ClassroomDao classroomDao;

    @Override
    public List<Classroom> classrommQuery(int clubClubId) {
        return classroomDao.classromQuery(clubClubId);
    }

    @Override
    public boolean classrommAdd(String classroomName, String classroomCapacity, int shopid,int clubClubId) {
   boolean classromboolean = classroomDao.classromAdd(classroomName,classroomCapacity,shopid, clubClubId);
        return classromboolean;
    }

    @Override
    public List<Classroom> query2Classroom(int id) {
        return classroomDao.classromQueryDao(id);
    }

    @Override
    public boolean classDelete(int classid) {
        return classroomDao.classDeleteDao(classid);
    }

    public ClassroomDao getClassroomDao() {
        return classroomDao;
    }

    public void setClassroomDao(ClassroomDao classroomDao) {
        this.classroomDao = classroomDao;
    }
}
